 <#include "/admin/common/include/html_head.html"> <#include
"/admin/common/include/sysparam.html">

<style>
#editable {
	padding: 10px;
	float: left;
}
</style>

<div class="row-fluid">
	<div class="span12">
		<!-- BEGIN EXTRAS PORTLET-->
		<div class="portlet box">
			<div class="portlet-title">
				<div class="caption">
					<h5>栏目编辑</h5>
				</div>
			</div>
			<div class="portlet-body form">
				<div class="alert alert-error " id="errtip" style="display: none;"></div>
				<form action="${contextPath}/groupkey/save.op"
					id="groupAddForm" class="form-horizontal" method="post">
					<input type="hidden" name="id" value="${(bean.id)?if_exists}" />
					<div class="control-group">
						<label class="control-label">主题</label>
						<div class="controls">  
							<@select paramCode=templatePackageCode
							value=(bean.templatePackageId)?if_exists item=' require="true" name="templatePackageId"
							datatype="require" msg="主题不能为空"'/>
							</div>
					</div>
					<div class="control-group">
						<label class="control-label">类型<span class="required">*</span></label>
						<div class="controls"><@select2 paramCode=groupType
							value=(bean.groupType)?if_exists item=' name="groupType"
							require="true" datatype="require" msg="类型不能为空"'/></div>
					</div>

					<div class="control-group">
						<label class="control-label">组名称<span class="required">*</span></label>
						<div class="controls">
							<input type="text" name="name" id="name" require="true"
								datatype="require" msg="组名称不能为空" class="span3 m-wrap"
								value="${(bean.name)?if_exists}" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">分类编码<span class="required">*</span></label>
						<div class="controls">
							<input type="text" name="groupKey" id="groupKey" require="true"
								datatype="require|limit" min="1" max="50" msg="编码不能为空"
								class="span3 m-wrap" value="${(bean.groupKey)?if_exists}" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">资源编码<span class="required">(可选)</span></label>
						<div class="controls">
							<input type="text" name="resourceKey" id="resourceKey"
								class="span3 m-wrap" value="${(bean.resourceKey)?if_exists}" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">是否有效<span class="required">*</span></label>
						<div class="controls"><@select2 paramCode=iseffCode
							value=(bean.iseff)?if_exists item=' name="iseff" require="true"
							datatype="require" msg="是否有效不能为空"'/></div>
					</div>

					<div class="form-actions">
						<button type="button" id="group_save_btn" class="btn blue">保存</button>
						<button  type="button" id="group_return_btn" class="btn ">关闭</button>
					</div>
				</form>
				<!-- END FORM-->
			</div>
		</div>
		<!-- END EXTRAS PORTLET-->
	</div>
</div>

<script>
	jQuery(document).ready(function() {
		tableAction.initSaveAction({
			formId : 'groupAddForm',
			queryUrl : '${contextPath}/groupkey/showBanner.op',
			saveUrl : '${contextPath}/groupkey/save.op',
			saveBtnId : 'group_save_btn'
		});
		

		$("#group_return_btn").bind("click", function() {
			var url = '${contextPath}/groupkey/showBanner.op';
			mainFrame.addContainer(url);
		});
	});
</script>
<#include "/admin/common/include/html_bottom.html">
